<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>        
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>public/css/layout.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>public/foundation-5.2.0/css/foundation.min.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>public/foundation-5.2.0/css/normalize.css"/> 
        <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>public/foundation-icons/foundation-icons.css" ></script>
        <script type="text/javascript" src="<?php echo base_url() ?>public/javascripts/jquery.validate.min.js" ></script>        
        <script type="text/javascript" src="<?php echo base_url() ?>public/javascripts/jquery.maskedinput.js" ></script>
        <script type="text/javascript" src="<?php echo base_url() ?>public/foundation-5.2.0/js/vendor/jquery.js" ></script>
        <script type="text/javascript" src="<?php echo base_url() ?>public/foundation-5.2.0/js/foundation/foundation.js" ></script>
        <script type="text/javascript" src="<?php echo base_url() ?>public/foundation-5.2.0/js/foundation/foundation.topbar.js" ></script>        
        <script type="text/javascript" src="<?php echo base_url() ?>public/foundation-5.2.0/js/foundation/foundation.dropdown.js" ></script>        
        <script>
            $(document).ready(function () {
                $(document).foundation();
            });
        </script>
         <script>
            $(document).ready(function() {
                $(document).foundation();
            });
        </script>
        <title>Sistema de Gestão e Controle Interno</title>
    </head>
    <body style=" background-color: #f3f3f3;">
        
        <div class="topo" >
            
        </div>

        <nav class="top-bar" data-topbar>
            

            <section class="top-bar-section">
                <ul class="left">
                    <?php echo $this->load->view('home/menu_administracao_view') ?>
                </ul>
               
            </section>            
             <div style="width:210px; float:right; font-size: 14px; color: #ededed">

                <div style="float: right; padding-right: 10px">Bem vindo, 
                    <span style="font-weight:bold;" ><?php echo get_user()->usuarios_username ?>!</span>&nbsp;
                    <a href="<?php echo base_url('index.php/usuario/sair'); ?>" style="color: #ededed"><img title="Sair" style="height: 20px" src="<?php echo base_url('public/imagem/botao_sair.png') ?>"></a>                  
                </div> 
            </div> 
        </nav>
        
        
        
        
        <?php
        $nots = get_notificacao();

        foreach ($nots as $k => $n) {
            if ($n['tipo'] == 1) {
                ?>
                <div class="row" style="margin-top: 10px;">
                    <div class="small-8 columns">
                        <div data-alert class="alert-box success radius"  style="left: 181px;">
                            Cadastro salvo com sucesso.
                            <?php
                            unset($_SESSION['notificacao']);
                            ?>
                            <a href="#" onclick="parentNode.remove()" class="close">&times;</a>
                        </div>
                    </div>
                </div>

            <?php } else if ($n['tipo'] == 2) { ?>
                <div class="row" style="margin-top: 10px;">
                    <div class="small-8 columns">
                        <div class="row collapse">
                            <div data-alert class="alert-box warning radius"  style="left: 181px;">
                                Ocorreu um problema durante o cadastrado, por favor tente novamente.
                                 <?php
                                unset($_SESSION['notificacao']);
                                ?>
                                <a href="#" onclick="parentNode.remove()" class="close">&times;</a>
                            </div>
                        </div>
                    </div>                
                </div>
                <?php
            }
        }
        ?>
        
        <div style="height: 13px"></div>
         <?php
        echo $this->load->view('home/cabecalho')
        ?>
       <?php 
		  if(isset($pagina)){
			  $this->load->view("{$pagina}_view");
			  }else{
				  $this->load->view("home/meio_view");
				  }
		  ?>
        <div style="height: 50px">
        </div>
      
        <div class="rodape" >
        
        </div>
        
    </body>
</html>